-- GENERATED SPELL FOR [Scarlet Guardsman] --


function spell0_4290(pUnit, Event) --@Defensive Stance,Self--
pUnit:FullCastSpellOnTarget(7164,pUnit)
pUnit:RegisterEvent('Sorts_4290', 580, 1)
end

function spell1_4290(pUnit, Event) --@Disarm,n/a--
pUnit:FullCastSpellOnTarget(6713,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_4290', 5312, 1)
end

function Sorts_4290(pUnit, Event)
local choix_sorts_4290 = math.random(0, 1)
if choix_sorts_4290 == 0 then
pUnit:RegisterEvent('spell0_4290', 1, 1)
end
if choix_sorts_4290 == 1 then
pUnit:RegisterEvent('spell1_4290', 1, 1)
end
end

function mob4290_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_4290', math.random(1500, 3000), 1)
end

function mob4290_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4290_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob4290_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(4290, 1, 'mob4290_Action')
RegisterUnitEvent(4290, 2, 'mob4290_Leave')
RegisterUnitEvent(4290, 3, 'mob4290_Kill')
RegisterUnitEvent(4290, 4, 'mob4290_Die')
